<%--
  Created by IntelliJ IDEA.
  User: Fan307
  Date: 2016/10/27
  Time: 9:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <%--手机端显示的网页，安卓手机 采用相对路径--%>
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <title>PDF文档</title>
    <style type="text/css">
        #displayName{
            align-content: center;
        }
    </style>
    <script type="text/javascript" src="http://sources.ikeepstudying.com/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="jquery.media.js"></script>
    <script type="text/javascript">
        $(function() {
            $('a.media').media({width:800 , height:600});
        });
        function getFile(filepath) {
            var getname = filepath.substring(filepath.lastIndexOf('\\'),filepath.length);
            var getName = getname.split('.');
            var name= getName[0].split('\\');
            document.getElementById("displayName").innerHTML = name[1];
        }
    </script>
</head>
<%
    String str = request.getParameter("filepath").replaceAll("\\\\","\\\\\\\\");
%>
<body onload="getFile('<%=str%>')">
<h3 id="displayName" align="center"></h3>
<div align="center"><a class="media" src="<%=str%>"></a></div>
</body>
</html>
